

class SecurityFilters {
		
	def filters = {
		doLogin(controller:'*' , action:'*' ){
			print "I'm filtering!"			
			before = {
				if (!controllerName)
					return true
				def allowedActions = ['show' , 'index' , 'list' , 'login' , 'validate', 'search' ]
				if (!session.user && !allowedActions.contains(actionName)){
					redirect(controller:'tekUser' , action:'login' ,
					params:['cName' : controllerName, 'aName' :actionName])
					return false // will prevent any other filters
				}
			}
		}
	}
}
